package com.youzan.cloud.component.biz.member.common.enums;
import com.youzan.cloud.component.biz.member.service.impl.*;

public enum SceneEnum {

    MEMBER_CREATE("memberCreate", MemberCreateService.class),
    MEMBER_QUERY("memberQuery", MemberQueryService.class),
    MEMBER_QUERY_BUSINESS("memberQueryBusiness", MemberQueryBusinessService.class),
    MEMBER_GRADE("memberGrade", MemberGradeService.class),
    MEMBER_GRADE_BUSINESS("memberGradeBusiness", MemberGradeBusinessService.class),
    MEMBER_UPDATE("memberUpdate",MemberUpdateService .class);


    private String sceneName;

    private Class serviceClass;

    private SceneEnum(String sceneName,Class serviceClass){
        this.sceneName = sceneName;
        this.serviceClass = serviceClass;
    }

    public String getSceneName() {
        return sceneName;
    }


    public Class getServiceClass() {
        return serviceClass;
    }

    public static Class getInfo(String name){

        for(SceneEnum sceneEnum : SceneEnum.values()){
            if(sceneEnum.getSceneName().equals(name)){
                return sceneEnum.serviceClass;
            }
        }
        return null;
    }
}
